
package com.ruoyi.pay.model.params;

import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;

/*
 * 抽象类 特约商户参数定义
 *
 * @author syf
 * @site
 * @date 2021/6/8 16:33
 */
public abstract class IsvsubMchParams {

    public static IsvsubMchParams factory(String ifCode, String paramsStr){

        try {
             Class<?> aClass = Class.forName(IsvsubMchParams.class.getPackage().getName() + "." + ifCode + "." + StrUtil.upperFirst(ifCode) + "IsvsubMchParams");
             IsvsubMchParams isvsubMchParams = (IsvsubMchParams) JSONObject.parseObject(paramsStr, aClass);
            return isvsubMchParams;
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        return null;
    }

}
